#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>






int main()
{

	
	printf("pid:%d\n",getpid());

	printf("ppid:%d\n",getppid());

	pid_t pd_t = fork();

while(1)
{

if(pd_t < 0)
{

	printf("create task fail\n");
	
	goto exit;

}
else if(pd_t == 0)
{

	printf("child task runtime\n");

	printf("create task pid :%d\n",getpid());

}
else
{

	printf("parent task runtime\n");

	printf("parent pid :%d\n",getpid());

}



}
exit:
return 0;
}

